
export default [
    {
        //默认路由，跳转到login
        path:'/',
        redirect:'/login'
    },
    {
        path:'/login',
        component:(resolve) => require(['../components/login/login.vue'],resolve)
    },
    {
        path:'/user',
        component:(resolve) => require(['../components/main/main.vue'],resolve),
        redirect:'/user/index',
        meta: {
            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
        },
        children:[
            {
                path:'index',
                component:(resolve) => require(['../components/user/user.vue'],resolve)
            },
            {
                path:'competition/addCompetition',
                component:(resolve) => require(['../components/competition/competition.vue'],resolve)
            },
            {
                path:'project/getProject',
                component:(resolve) => require(['../components/competition/mycompetition.vue'],resolve)
            },
            {
                path:'info/1',
                component:(resolve) => require(['../components/teacher/teacher.vue'],resolve)
            },
            {
                path:'info/2',
                component:(resolve) => require(['../components/competition/competition.vue'],resolve)
            },
            {
                path:'info/3',
                component:(resolve) => require(['../components/competition/competition.vue'],resolve)
            },
            {
                path:'info/4',
                component:(resolve) => require(['../components/competition/competition.vue'],resolve)
            },
            {
                path:'project/getAllProject',
                component:(resolve) => require(['../components/competition/competition.vue'],resolve)
            },
            {
                path:'getAllUser',
                component:(resolve) => require(['../components/competition/competition.vue'],resolve)
            },
            {
                path:'role/getAllRole',
                component:(resolve) => require(['../components/competition/competition.vue'],resolve)
            },
            {
                path:'resource/getAllResource',
                component:(resolve) => require(['../components/competition/competition.vue'],resolve)
            }
        ]
    }
    // {
    //     path:'*',
    //     redirect:error
    // }
]